home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Container / Sources / View.h < prev    next >
Encoding:
Text File  |  1996-12-16  |  2.8 KB  |  92 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                View.h
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef VIEW_H
  11. #define VIEW_H
  12.  
  13. // ----- Part Layer -----
  14.  
  15. #ifndef FWSVIEW_H
  16. #include "FWSView.h"
  17. #endif
  18.  
  19. //========================================================================================
  20. // Forward Declaration
  21. //========================================================================================
  22.  
  23. class FW_CMouseEvent;
  24. class FW_CEmbeddedMouseEvent;
  25. class FW_CBorderMouseEvent;
  26. class FW_CVirtualKeyEvent;
  27.  
  28. class CContainerPart;
  29. class CContainerFrame;
  30. class CPartContent;
  31.  
  32. //========================================================================================
  33. // Class CContainerView
  34. //========================================================================================
  35.  
  36. class CContainerView : public FW_CSuperView
  37. {
  38. public:
  39.     FW_DECLARE_CLASS
  40.  
  41. //----------------------------------------------------------------------------------------
  42. // Initialization/destruction
  43. //
  44. public:        
  45.     CContainerView(Environment* ev, 
  46.                     CContainerFrame* frame, 
  47.                     FW_CRect& bounds, 
  48.                     FW_CPoint& extent,
  49.                     CContainerPart* part);
  50.     virtual ~ CContainerView();
  51.     
  52. private:
  53.     CContainerView(Environment* ev);
  54.     
  55. //----------------------------------------------------------------------------------------
  56. // Inherited API
  57. //
  58. public:        
  59.     // ----- Cursor -----
  60.     virtual FW_Handled        AdjustCursor(Environment* ev, ODFacet* facet, const FW_CPoint& where, ODEventInfo* eventInfo);
  61.     
  62.     // ----- Drawing -----
  63.     virtual void             Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
  64.     virtual void             AdjustToNewLayout(Environment *ev, 
  65.                                             const FW_CPoint& oldExtent, 
  66.                                             const FW_CPoint& newExtent, 
  67.                                             FW_ERedrawVerb redraw);
  68.     virtual void            SizeChanged(Environment* ev, const FW_CPoint& oldSize);
  69.  
  70.     // ----- Events -----
  71.     virtual FW_Handled        DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
  72.     virtual FW_Handled        DoVirtualKeyDown(Environment* ev, const FW_CVirtualKeyEvent& theVirtualKeyEvent);
  73.  
  74.     virtual FW_Boolean        WantsToBeTarget(Environment* ev);
  75.  
  76.     // ----- Archiving -----
  77.     static void*            Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  78.     static void                Destroy(void* object, FW_ClassTypeConstant type);
  79.     virtual void            Flatten(Environment* ev, FW_CWritableStream& stream) const;
  80.     virtual void            InitializeFromStream(Environment* ev, FW_CReadableStream& stream);
  81.  
  82. //----------------------------------------------------------------------------------------
  83. // Data Members
  84. //
  85. private:    
  86.     CContainerPart*        fContainerPart;
  87.     CPartContent*        fPartContent;
  88.     CContainerFrame*    fContainerFrame;
  89. };
  90.  
  91. #endif
  92.